﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MvcShop.Models
{
    [MetadataType(typeof(DeliverMetadata))]
    public partial class Deliver
    {
    }

    public class DeliverMetadata
    {
        [DisplayName("送货方式名称")]
        [Required(ErrorMessage = "送货方式名称不能为空。")]
        [StringLength(50,ErrorMessage="送货方式名称不能超过50字节。")]
        public string DeliverName { get; set; }

        [DisplayName("运费")]
        [Required(ErrorMessage = "运费不能为空。")]
        [DataType(DataType.Currency,ErrorMessage="请输入合法的金额。")]
        public decimal DeliverMoney { get; set; }
    }
}
